package com.w2cx.selenium.page;

import com.w2cx.selenium.base.DriverBase;
import com.w2cx.selenium.util.Locator;
import org.openqa.selenium.WebElement;

import java.util.List;

public class VideoReviewPage extends BasePage {

    //DriverBase driver;
    public VideoReviewPage(DriverBase driver){
        super(driver);
    }

    //获取“内容审核”菜单
    public WebElement getContentReviewMenu(){
       // return this.getContentReviewMenu();
        List<WebElement> list = elements(Locator.getByLocator("firstMenuList"));
        WebElement element = list.get(4);
        System.out.println("找到元素:"+element.getText());
        return element;
    }

    //获取“视频审核”菜单
    public WebElement getVideoReviewMenu(){
        WebElement element = element(Locator.getByLocator("videoReviewMenu"));
        System.out.println("找到元素:"+element.getText());
        return element;
    }

    //获取第一条视频ID
    public WebElement getFirstVideoID(){
        WebElement element = element(Locator.getByLocator("firstVideoID"));
        System.out.println("找到元素:"+element.getText());
        return element;
    }


    //获取第一条视频对应“去审核”按钮
    public WebElement getFirstToReviewBtn(){
        WebElement element = element(Locator.getByLocator("videoToReviewBtn"));
        System.out.println("找到元素:"+element.getText());
        return element;
    }

    //获取内容简介输入框
    public WebElement getContentIntroduInput(){
        WebElement element = element(Locator.getByLocator("contentIntroduInput"));
        System.out.println("找到元素:"+element.getText());
        return element;
    }


    //获取“发布”按钮
    public WebElement getReleaseBtn(){
        WebElement element = element(Locator.getByLocator("releaseBtn"));
        System.out.println("找到元素:"+element.getText());
        return element;
    }


    //获取待审核视频列表
    public List<WebElement> getUnReviewVideoList(){
        List<WebElement> list = elements(Locator.getByLocator("videoReviewList"));
        return list;
    }

}
